home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / cbibcode.arc / WHEREY.C < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-05  |  414 b   |  22 lines

  1. /* p900.c --- bible */
  2. #include <conio.h>
  3. #include <stdlib.h>
  4. #define ESC '\033'
  5. main()
  6. {
  7.     int xpos = 30, ypos, c = 0;
  8.     cprintf("Press ESC to exit");
  9.     while(c != ESC)
  10.     {
  11.         clrscr();
  12.         gotoxy(1, 1);
  13.         cprintf("Press ESC to exit");
  14.         randomize();
  15.         gotoxy(xpos, random(25) + 1);
  16.         ypos = wherey();
  17.         putch('Y');
  18.         gotoxy(1, 12);
  19.         cprintf("The 'Y' is at position %d", ypos);
  20.         c = getch();
  21.     }
  22. }